<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
  <div id="app">
    <h1 v-if = 'flag'>这里是雾都</h1>
    <h1 v-else-if='flag2'>这里是上海</h1>
    <!-- 他们3个是个整体，如果前面2个判断都是false，则else将生效进行判断 -->
    <h1 v-else='flag2'>这里是上海地区</h1>
  </div>
  <script>
    let vm=new Vue({
      el:'#app',
      data(){
        return{
          flag:false,
          flag2:false
        }
      }
    });
  </script>
</body>
</html>